import './App.scss'

import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom'

// import Layout from './pages/Layout'
import Layout from '@/pages/Layout'
import Login from './pages/Login'
import NotFound from './pages/NotFound'

const App = () => {
  return (
    <Router>
      <div className="app">
        <Switch>
          <Route
            exact
            path="/"
            render={() => <Redirect to="/home"></Redirect>}
          ></Route>
          <Route path="/home" component={Layout}></Route>
          <Route path="/login" component={Login}></Route>

          {/* 404 */}
          <Route>
            <NotFound></NotFound>
          </Route>
        </Switch>
      </div>
    </Router>
  )
}

export default App
